/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface VisualKkMonthData extends BasicModel<VisualKkMonthData> {
  workShop?: string; // 车间
  title?: string; // 标题
  uploadDate?: string; // 上传日期
  createByName?: string; // 创建人名称
  visualKkMonthDataCList?: any[]; // 子表列表
}

export const visualKkMonthDataList = (params?: VisualKkMonthData | any) =>
  defHttp.get<VisualKkMonthData>({
    url: adminPath + '/mesVisual/visual/visualKkMonthData/list',
    params,
  });

export const visualKkMonthDataListData = (params?: VisualKkMonthData | any) =>
  defHttp.post<Page<VisualKkMonthData>>({
    url: adminPath + '/mesVisual/visual/visualKkMonthData/listData',
    params,
  });

export const visualKkMonthDataForm = (params?: VisualKkMonthData | any) =>
  defHttp.get<VisualKkMonthData>({
    url: adminPath + '/mesVisual/visual/visualKkMonthData/form',
    params,
  });

export const visualKkMonthDataSave = (params?: any, data?: VisualKkMonthData | any) =>
  defHttp.postJson<VisualKkMonthData>({
    url: adminPath + '/mesVisual/visual/visualKkMonthData/save',
    params,
    data,
  });

export const visualKkMonthDataDelete = (params?: VisualKkMonthData | any) =>
  defHttp.get<VisualKkMonthData>({
    url: adminPath + '/mesVisual/visual/visualKkMonthData/delete',
    params,
  });

export const visualKkMonthDataPublish = (params?: VisualKkMonthData | any) =>
  defHttp.get<VisualKkMonthData>({
    url: adminPath + '/mesVisual/visual/visualKkMonthData/publish',
    params,
  });

export const visualKkMonthDataUnPublish = (params?: VisualKkMonthData | any) =>
  defHttp.get<VisualKkMonthData>({
    url: adminPath + '/mesVisual/visual/visualKkMonthData/unpublish',
    params,
  });

export const findPicInfo = (params?: any, data?: VisualKkMonthData | any) =>
  defHttp.postJson<VisualKkMonthData>({
    url: adminPath + '/mesVisual/visual/visualKkMonthData/findPicInfo',
    params,
    data,
  });
